<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
	<table summary="" style="border: 1px solid red;">
		<th><spring:message code="associazione.convenzioni.label"/></th>
		            <tr>
			              <td colspan="2" id="${convention.id}">
			        <tr>
			              <td><spring:message code="associazione.convenzioni.nome.label"/></td>
			              <td>${convention.name}</td>
			        </tr>
			        <tr>
			              <td><spring:message code="associazione.convenzioni.descrizione.label"/></td>
			              <td>${convention.description}</td>
			        </tr>
			        <tr>
			               <c:if test="${convention.websiteLink !='null'}" >
			                  <td><spring:message code="associazione.convenzioni.websiteLink.label"/></td>
			                  <td>${convention.websiteLink}</td>
			              </c:if> 
			        </tr>
			        <tr>  
			              <c:if test="${convention.phone !='null'}" >
			                 <td><spring:message code="associazione.convenzioni.telefono.label"/></td>
			                 <td>${convention.phone}</td>
			              </c:if> 
			        </tr>
			        <tr>
			              <c:if test="${convention.email !='null'}" >
			                 <td><spring:message code="associazione.convenzioni.email.label"/></td>
			                 <td>${convention.email}</td>
			              </c:if> 
			        </tr>
			        <tr>
			              <c:if test="${convention.address !='null'}" >
			                 <td><spring:message code="indirizzo.via.label"/></td>
			                 <td>${convention.address.street}</td>
			                 <td>${convention.address.civicNumber}</td>
			                 <td>${convention.address.city}</td>
			                 <td>${convention.address.postalCode}</td>
			                 <td>${convention.address.province}</td>
			              </c:if> 
			        </tr>
			        <tr>
			               <td>INSERITO DA: </td>
			               <td>
			                  <c:url value="/member/edit/${convention.member.id}" var="edit" />
                              <a href="${edit}">${convention.member.firstName}</a>
                           </td>
			               <c:if test="${convention.member.lastName !='null'}" >
			                   <td> ${convention.member.lastName}</td>
			               </c:if> 
			        </tr>
			        <tr>
			               <td><spring:message code="associazione.convenzioni.stato.label"/></td>
			               <c:choose>
                            <c:when test="${convention.active=='true'}">
                                   <td>SI</td>
                            </c:when>
                           <c:otherwise>
                                   <td>NO</td>
                           </c:otherwise>
                           </c:choose>
			        </tr>
			        <tr>  
			             <td>
			                  <c:url value="/convention/update/${convention.id}" var="update" />
                              <a href="${update}"><spring:message code="link.update.label"/></a>
                         </td>
                         <td>
			                  <c:url action="/convention/remove/${convention.id}" var="cancel"  method="POST"/>
                              <a href="${cancel}"><spring:message code="link.remove.label"/></a>
                         </td>
                    </tr>
	</table>
	
</body>
</html>